package Controller;
import java.awt.event.KeyEvent;

import mvc.Controller;
import View.*;
import Model.*;

public class ControllerGame extends Controller{
	ViewGame vista;
	ArenaModel arenaModel;
	
	public ControllerGame(ArenaModel model){
		this.arenaModel = model;
		vista = new ViewGame(this, model);
		vista.createView();
		vista.createControls();
	}
	
	public void moverAliens(){
		arenaModel.moverAliens();
	}
	public void gameOver(){
		//vista.timer.stop();
		
		vista.gameOver();
		
	}
	public void jugadorGana(){
		
		vista.jugadorGana();
	}
	public void irMenu(){
		setEstado(new EstadoMenu());
		estado.execute();
		
	}
	
	public void keyPressed(KeyEvent e) {

        arenaModel.setKeyPressed(e);
    }

    public void keyReleased(KeyEvent e) {
        arenaModel.setKeyReleased(e);
    }
}
